# GNAFU - "Ground, Navy and Air Fuck-Up" real-time strategy game
# Copyright (C) 2008-2009 k0wax <k0waxk0wax@gmail.com>
#
# This file is part of GNAFU.
#
# GNAFU is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GNAFU is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNAFU.  If not, see <http://www.gnu.org/licenses/>.

"""LT1 Tank"""
from __future__ import division, absolute_import
from src import unit, loaders
from .generic import GenericTank, GenericTankView

@loaders.load_props('units/lt1/')
class LT1Model(GenericTank):
    def f(self):
        print 'm->f'
    def update(self, dt):
        super(LT1Model, self).update(dt)

class LT1View(GenericTankView):
    """View+Controller+Adaptor+Model_Provider"""
    def f(self):
        print 'v->f'
        super(LT1View, self).f()
    #@supercall
    def step(self, *args): # bad shit. too mutch override
        print 'view step'
        super(LT1View, self).step(*args)

class LT1(LT1View, LT1Model):
    object_name = 'LT1 Tank'
    def __init__(self, *args, **kw):
        LT1View.__init__(self)
        self._view_dict = self.__dict__.copy()
        LT1Model.__init__(self, *args, **kw)
    def __setstate__(self, state):
        self.__init__()
        self.__dict__.update(state)
